

Page({
  data: {
    serviceHours: '8:00-22:00',
    servicePhone: '400-888-8888',
    responseTime: '2小时内',
    
  },

  onLoad: function() {
    wx.setNavigationBarTitle({
      title: '联系客服'
    });
  },

  // 拨打客服电话
  callService: function() {
    wx.makePhoneCall({
      phoneNumber: this.data.servicePhone,
      success: function() {
        console.log('拨打电话成功');
      },
      fail: function() {
        console.log('拨打电话失败');
      }
    });
  },

  // 导航到常见问题详情页
  navigateToFaq: function(e) {
    const faqId = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: `/pages/faqDetail/faqDetail?id=${faqId}`
    });
  },

  // 复制客服电话
  copyServicePhone: function() {
    wx.setClipboardData({
      data: this.data.servicePhone,
      success: function() {
        wx.showToast({
          title: '电话号码已复制',
          icon: 'success'
        });
      }
    });
  }
}); 